import { GETMOVIELIST } from "../constant/movieConst";
// 定义reducer的初始值
const init = {
  movieList: [],
};

export default function countReducer(prevStata = init, action) {
  const { type, data } = action;
  console.log(type, data);
  switch (type) {
    case GETMOVIELIST:
      return {
        ...prevStata,
        movieList: data,
      };
  }
  return prevStata;
}
